package com.cnswhy.cloud.server.core.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cnswhy.cloud.common.core.base.mapper.SuperMapper;
import com.cnswhy.cloud.server.core.dto.CustomerTeamDTO;
import com.cnswhy.cloud.server.core.dto.CustomerWalletTransDtlPageDTO;
import com.cnswhy.cloud.server.core.entity.Customer;

import com.cnswhy.cloud.server.core.entity.CustomerTeam;
import com.cnswhy.cloud.server.core.entity.CustomerWalletTransDtl;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * Mapper 接口
 * 
 * </p>
 *
 * @author cnswhy
 * @date 2020-10-18
 */
@Repository
public interface CustomerMapper extends SuperMapper<Customer> {
    @Select("select count(1) from t_customer")
    Long getSum();
    @Select("select count(1) from t_customer where date_format(create_time, '%Y-%m-%d')=date_format(now(), '%Y-%m-%d')")
    Long getSumToday();
    IPage<CustomerTeam> teamPage(IPage page, @Param("data") CustomerTeamDTO customerTeamDTO);

}
